import request from "@/api/request";

// 获取作品信息
export function getartworks() {
 return request({
    method: "GET",
    url: "api/a/artworks/",
 });
}

// 根据id获取作品信息
export function getartworkid(id) {
 return request({
    method: "GET",
    url: "api/a/artworks/" + id,
 });
}

// 根据艺术家id获取作品信息
export function getartistWork(id) {
 return request({
    method: "GET",
    url: "api/a/artist/artworks/" + id,
 });
}

// 添加作品
export function postartwork(data) {
 return request({
   headers: {
      'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'
  },
    method: "POST",
    url: "api/a/artworks/",
    data
 });
}